package rendering;

import math.Quaternion;
import math.Vector3D;

public class CameraFreeFlight  extends Camera
{
	
	private Quaternion orientation;
	
	private double incremRotX=0,incremRotY=0,incremRotZ=0; 
	private double nextPosX=0,nextposY=0,nextPosZ=0;
	
	public  CameraFreeFlight(){
		super(new Vector3D(2,2,2));
		this.orientation = new Quaternion(1,0,0,0);
	}




	public Quaternion getOrientation() {
		return orientation;
	}

	public void setOrientation(Quaternion orientation) {
		this.orientation = orientation;
	}

	public double getIncremRotX() {
		return incremRotX;
	}

	public void setIncremRotX(double nextTransX) {
		this.incremRotX = nextTransX;
	}

	public double getIncremRotY() {
		return incremRotY;
	}

	public void setIncremRotY(double nextTransY) {
		this.incremRotY = nextTransY;
	}

	public double getIncremRotZ() {
		return incremRotZ;
	}

	public void setIncremRotZ(double nextTransZ) {
		this.incremRotZ = nextTransZ;
	}

	public double getNextPosX() {
		return nextPosX;
	}

	public void setNextPosX(double nextPosX) {
		this.nextPosX = nextPosX;
	}

	public double getNextposY() {
		return nextposY;
	}

	public void setNextposY(double nextposY) {
		this.nextposY = nextposY;
	}

	public double getNextPosZ() {
		return nextPosZ;
	}

	public void setNextPosZ(double nextPosZ) {
		this.nextPosZ = nextPosZ;
	}
	
	public void update(){
		Quaternion x = new Quaternion(Vector3D.X,incremRotX);
		Quaternion y = new Quaternion(Vector3D.Y,incremRotY);
		Quaternion z = new Quaternion(Vector3D.Z,incremRotZ);
		
		//System.out.println("x = "+x);
		//System.out.println("y = "+y);
		//System.out.println("z = "+z);
		orientation.thisTime(x);
	    orientation.thisTime(y);
		orientation.thisTime(z);
		
		
		
		//z.thisTime(y);
		//z.thisTime(x);
		//z.thisTime(orientation);
		//orientation = z;
		
		//orientation=x;
		orientation.normalise();

		//System.out.println("xyz = "+orientation);
		
		
		//Quaternion.rotate(orientation,x);
		//System.out.println("x = "+orientation);
		
		incremRotX=0;	incremRotY=0; incremRotZ=0;
		nextPosX=0;  	nextposY=0;	  nextPosZ=0;
	}




	@Override
	public void translate(Vector3D direction) {
		// TODO Auto-generated method stub
		
	}
	
	
	
}
